﻿<UserControl x:Class="OnlineVideos.ShowQuiz"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480" >

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <ListBox x:Name="lbxSubjectsList" Grid.Row="0" Margin="0,-20,0,30" SelectionChanged="lbxSubjectsList_SelectionChanged" Foreground="White" VerticalAlignment="Top">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Height="120" Width="480">
                        <toolkit:ContextMenuService.ContextMenu>
                            <toolkit:ContextMenu Opened="ContextMenu_Opened" x:Name="ShowVideoContaxt" >
                                <toolkit:MenuItem x:Name="Pin"  Click="Quizpintostart_Click">
                                </toolkit:MenuItem>
                                <toolkit:MenuItem x:Name="Quizaddtofavorites" Header="add to favorites" Click="Quizaddtofavorites_Click"/>
                                <!--<toolkit:MenuItem x:Name="examreportbrokenlink" Header="report broken link" Click="examreportbrokenlink_Click">
                                      </toolkit:MenuItem>-->
                                <toolkit:MenuItem x:Name="Quizsharelink" Header="share link" Click="Quizsharelink_Click">
                                </toolkit:MenuItem>
                                <toolkit:MenuItem x:Name="Rating" Header="{Binding Ratetitle}"  Click="Quizratelink_Click">
                                </toolkit:MenuItem>
                                <toolkit:MenuItem Header="delete link" x:Name="del" Click="del_Click_1">
                                </toolkit:MenuItem>
                            </toolkit:ContextMenu>
                        </toolkit:ContextMenuService.ContextMenu>
                        <Image Source="/Images/ArrowImg.png" Height="43" Width="43" VerticalAlignment="Center" Margin="10,10,5,0"/>
                        <TextBlock Text="{Binding Name}" Margin="4,4,0,0" Width="250" FontSize="26" VerticalAlignment="Center" TextWrapping="Wrap" Tag="{Binding Sno}"/>
                        <StackPanel Width="130"  Margin="10,27,10,10" Orientation="Vertical">
                            <TextBlock Text="{Binding Result}"  Width="83" FontSize="24"  TextWrapping="Wrap" />
                            <Image Width="130"  Source="{Binding RatingBitmapImage}"  Margin="0,20,0,0"/>
                        </StackPanel>

                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <StackPanel Grid.Row="0" x:Name="txtxstackpl" Orientation="Vertical" Margin="20,0,0,0" Visibility="Collapsed">
            <TextBlock x:Name="tblktext" Foreground="White"   Grid.Row="1" FontSize="26" Margin="0,15,0,0" TextWrapping="Wrap" />

            <StackPanel Orientation="Horizontal">
                <TextBlock  Foreground="White" Text="No of questions : "   FontSize="24" Margin="0,15,0,0" TextWrapping="Wrap" />
                <TextBlock x:Name="txttotquestions" Foreground="White"  FontSize="24" Margin="20,15,0,0" TextWrapping="Wrap" />

            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock  Foreground="White" Text="Time limit : "   FontSize="24" Margin="0,15,0,0" TextWrapping="Wrap" />
                <TextBlock x:Name="txttimelimit" Foreground="White"  FontSize="24" Margin="20,15,0,0" TextWrapping="Wrap" />

            </StackPanel>
            <StackPanel Orientation="Horizontal" >
                <Image Source="/Images/Start.png" Height="70" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="8,30,0,0" Width="160"  x:Name="imgstart" MouseLeftButtonDown="imgstart_MouseLeftButtonDown"></Image>
                <Image Source="/Images/Cancel.png" Height="70" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="60,30,0,0" Width="160"  x:Name="imgcancel" MouseLeftButtonDown="imgcancel_MouseLeftButtonDown"></Image>
            </StackPanel>
           
            <!--<ad:AdControl Height="80" Grid.Row="3" AdUnitId="" ApplicationId="" ></ad:AdControl>-->
        </StackPanel>
        <Canvas>
            <TextBlock x:Name="tblksubjectstest" Canvas.Top="200" Canvas.Left="80" FontSize="28" Visibility="Collapsed" Foreground="White"/>
            <TextBlock x:Name="tblkquestionsnotavailable" Canvas.Top="200" Canvas.Left="80" FontSize="28" Visibility="Collapsed" Foreground="White"/>
        </Canvas>
        
    </Grid>

</UserControl>
